#!/bin/bash
#function: 自动安装go1.9.4
#parmeter:
#author: yeslf 
#version:
#Test: CentOS6
yum install autoconf automake libtool curl make g++ unzip gcc-c++  -y

mv go /usr/local/
for i  in /usr/local/go/bin/*; do  ln -s $i  /usr/bin/ ; done

mkdir -p  /usr/local/go/gopath/src/github.com

mkdir -p /usr/local/go/gopath/src/github.com/{golang,gorilla}


go version
cat>>/etc/profile<</
export GOROOT=/usr/local/go
export GOBIN=$GOROOT/bin
export PATH=$PATH:$GOBIN
export GOPATH=/usr/local/go/gopath

/

source  /etc/profile


